<!DOCTYPE html>
<html>
<head lang="en">
  <meta charset="UTF-8">
  <title>${title}</title>
  <link rel="icon" href="${base}/images/favicon.ico" type="/image/x-icon" />
	<link rel="stylesheet" href="${base}/css/common.css">
    <link rel="stylesheet" href="${base}/css/admin.css">
    <script type="text/javascript" src="${base}/js/common.js"></script>
    <base href="${base}/admin/">
</head>
<body>
<#include "/common/admin_left${type}.flt">
<div class="main">
    <div class="head">
        <div class="title"><p>房源信息${action}</p></div>
    </div>
    <div class="single"  id="single">
        <form action="houseSave"   method="post"   name="singleform" id="singleform"    >
        	<input type="hidden"  name="type"  value="${house.type}"/>
        	<input type="hidden"  name="id"  value="${house.id}"/>
            <div class="contianer">
            	<div class="body">
            		<div class="form_control">
	                            <label><sign class="red">*</sign>房产证:</label>
	                            <div class="input">
	                            	<img src="${house.resid?if_exists}"   title="房产证"    width="320px"  height="160px"   class="btn"/>
	                            </div>
	                            <span></span>
	                            <div class="clear"></div>
	                  </div>
	                   <#if house.id =0>
	                  <div class="form_control">
	                            <label><sign class="red">*</sign>房东:</label>
	                            <div class="input">
	                            	<select name="userid" id ="userid" >
	                            		<#list userList as one>
	                            		<option value="${one.id}">${one.id} ${one.mobile}</option>
	                            		</#list>
	                            	</select> 
	                            </div>
	                            <span></span>
	                            <div class="clear"></div>
	                  </div>
	                  </#if>
	                  <div class="form_control">
	                            <label><sign class="red">*</sign>房源名称:</label>
	                            <div class="input">
	                            	<input name="name" id ="name" value="${house.name}"/> 
	                            </div>
	                            <span></span>
	                            <div class="clear"></div>
	                  </div>
	                  <div class="form_control">
	                            <label><sign class="red">*</sign>房东姓名:</label>
	                            <div class="input">
	                            	<input name="ownername" id ="ownername" value="${house.ownername}"/> 
	                            </div>
	                            <span></span>
	                            <div class="clear"></div>
	                  </div>
	                  <div class="form_control">
	                            <label><sign class="red">*</sign>房东电话:</label>
	                            <div class="input">
	                            	<input name="ownermobile" id ="ownermobile" value="${house.ownermobile}"/> 
	                            </div>
	                            <span></span>
	                            <div class="clear"></div>
	                  </div>
	                  <div class="form_control">
	                            <label><sign class="red">*</sign>布草颜色:</label>
	                            <div class="input">
	                            	<input name="linen" id ="linen" value="${house.linen}"/> 
	                            </div>
	                            <span></span>
	                            <div class="clear"></div>
	                  </div>
	                  <div class="form_control">
	                            <label><sign class="red">*</sign>1.5米床用套数</label>
	                            <div class="input">
	                            	<input name="five" id ="five" value="${house.five}"/> 
	                            </div>
	                            <span></span>
	                            <div class="clear"></div>
	                  </div>
	                  <div class="form_control">
	                            <label><sign class="red">*</sign>1.8米床用套数</label>
	                            <div class="input">
	                            	<input name="eight" id ="eight" value="${house.eight}"/> 
	                            </div>
	                            <span></span>
	                            <div class="clear"></div>
	                  </div>	                  
	                   <div class="form_control">
	                            <label><sign class="red">*</sign>房内设施:</label>
	                            <div class="input">
	                            	<input name="equip" id ="equip" value="${house.equip}"/> 
	                            </div>
	                            <span></span>
	                            <div class="clear"></div>
	                  </div>
	                 
	                  <div class="form_control">
	                            <label><sign class="red">*</sign>基础价格:</label>
	                            <div class="input">
	                            	<input name="aprice" id ="aprice" value="${house.aprice}"/> 
	                            </div>
	                            <span></span>
	                            <div class="clear"></div>
	                  </div>
	                   <div class="form_control">
	                            <label><sign class="red">*</sign>省:</label>
	                            <div class="input">
	                            	<input name="province" id ="province" value="${house.province}"/> 
	                            </div>
	                            <span></span>
	                            <div class="clear"></div>
	                  </div>
	                   <div class="form_control">
	                            <label><sign class="red">*</sign>市:</label>
	                            <div class="input">
	                            	<input name="city" id ="city" value="${house.city}"/> 
	                            </div>
	                            <span></span>
	                            <div class="clear"></div>
	                  </div>
	                  <div class="form_control">
	                            <label><sign class="red">*</sign>区:</label>
	                            <div class="input">
	                            	<input name="village" id ="village" value="${house.village}"/> 
	                            </div>
	                            <span></span>
	                            <div class="clear"></div>
	                  </div>
	                   <div class="form_control">
	                            <label><sign class="red">*</sign>街道:</label>
	                            <div class="input">
	                            	<input name="road" id ="road" value="${house.road}"/> 
	                            </div>
	                            <span></span>
	                            <div class="clear"></div>
	                  </div>
	                   <div class="form_control">
	                            <label><sign class="red">*</sign>地址:</label>
	                            <div class="input">
	                            	<input name="address" id ="address" value="${house.address}"/> 
	                            </div>
	                            <span></span>
	                            <div class="clear"></div>
	                  </div>
	                  <div class="form_control">
	                            <label><sign class="red">*</sign>lon:</label>
	                            <div class="input">
	                            	<input name="lon" id ="lon" value="${house.lon}"/> 
	                            </div>
	                            <span></span>
	                            <div class="clear"></div>
	                  </div>
	                  <div class="form_control">
	                            <label><sign class="red">*</sign>lat:</label>
	                            <div class="input">
	                            	<input name="lat" id ="lat" value="${house.lat}"/> 
	                            </div>
	                            <span></span>
	                            <div class="clear"></div>
	                  </div>
	                  <div class="form_control">
	                            <label><sign class="red">*</sign>集中点:</label>
	                            <div class="input">
	                            	<select id="fid" name="fid">
	                            		<option value="0">无</option>
	                            		<#list focusList as one>
	                            		<option value="${one.id}">${one.name}</option>
	                            		</#list>
	                            	</select>
	                            </div>
	                            <span></span>
	                            <div class="clear"></div>
	                  </div>
	                  <div class="form_control">
	                            <label><sign class="red">*</sign>状态:</label>
	                            <div class="input">
	                            	<select id="status" name="status">
	                            		<option value="0">未审核</option>
	                            		<option value="1">审核过</option>
	                            	</select>
	                            </div>
	                            <span></span>
	                            <div class="clear"></div>
	                  </div>
	                  
					  
	                  <div class="complete pb30"><input id="submit" type="button"  value="保存">
	                  </div>
                  </div>
        	</div>
        </form>
    </div>
 </div>
<script src="${base}/js/jquery1.10.2.min.js" ></script>
<script src="${base}/js/jquery.form.js" ></script>
<script>
$("#status").val("${house.status?if_exists}");
$("#fid").val("${house.fid?if_exists}");
if ("${view?if_exists}"){
	alert("保存成功!");
}

var currentPic;
jQuery(function(){
	$("#submit").click(function (){
		var options = {
            success:  showResponse1,  //处理完成的回调函数
            resetForm: true,
            //dataType:  'json'
        };
        $("#singleform").ajaxSubmit(options);
	});

});

function showResponse1(responseText){
	alert(responseText);
	window.location.reload();
}
</script>
</body>
</html>
